import { BaseModel } from '@/common/base/base.model';
import { Column, Entity, Index } from 'typeorm';

@Entity('ADMIN_LOGIN_LOG', {
  synchronize: false,
}) // 用户（也保存当时的token，用于禁用踢下线）
@Index('ADMIN_LOGIN_LOG.admin_uuid&create_time', ['adminUuid', 'createTime'])
export class AdminLoginLogModel extends BaseModel {
  @Column({
    comment: '管理员uuid',
    type: 'uuid',
  })
  adminUuid: string;

  @Column({
    comment: 'token',
    type: 'varchar',
    length: 50,
  })
  token: string;
}
